package cn.itlaobing.service.Impl;

import cn.itlaobing.dao.StationDao;
import cn.itlaobing.service.StatinService;

import java.sql.SQLException;
import java.util.Map;

/**
 * Created by admin on 2017/11/10.
 */
public class StainServiceImpl implements StatinService {
    private StationDao stationDao=new StationDao();
    public Map<String,Object> queryAll(String startStation, String endStation, String trainNum){
        try {
           return stationDao.query(startStation,endStation,trainNum);
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }finally{
            try {
                stationDao.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return null;
    }
}
